package com.xinkao.log.util.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author: LXF
 * @description: 通用常量类, 单个业务的常量请单开一个类, 方便常量的分类管理
 * @date: 2017/10/24 10:15
 */
@Component
public class Constants {

	/**
	 * 返回值
	 */
	public static final String SUCCESS_CODE = "200";
	/**
	 * 成功消息
	 */
	public static final String SUCCESS_MSG = "请求成功";

	/**
	 * session中存放用户信息的key值
	 */
	public static final String SESSION_USER_INFO = "userInfo";
	/**
	 * 用户权限
	 */
	public static final String SESSION_USER_PERMISSION = "userPermission";
	/**
	 * redis的验证码默认生效时间
	 */
	public static final long VALIDATE_CODE_TIME = 10*60;
	/**
	 * redis权限头
	 */
	public static final String REDIS_PERMISSION = "XK_EXAMPLE_";

	/**
	 * 默认密码
	 */
	public static final String DEFAULT_PASSWORD  = "log@2021";
	/**
	 * 默认状态
	 */
	public static final String DEFAULT_STATUS  = "1";
	/**
	 * 默认操作人
	 */
	public static final String ADMINISTRATOR  = "admin";
	/**
	 * 默认密码加密方式
	 */
	public static final String ENCRYPTION  = "MD5";
	/**
	 * 默认密码加密次数
	 */
	public static final int TIMES  = 2;

	/**
	 * 默认角色权限关联表中全权限类型
	 */
	public static final String ALL_MENU  = "1";
	/**
	 * 默认角色权限关联表中半权限类型
	 */
	public static final String HALF_MENU  = "2";

	/**
	 * 下载模板
	 */
	public static final String TEMPLATES_EXCEL_ADDRESS="/templates/导入模板.xlsx";

	/**
	 * 获取token所需要的的头参数
	 */
	public static final String AUTH = "Authorization";

	/**
	 * 视频和图片远程地址
	 */
	public static  String REQUEST_PATH;

	@Value("${prop.request_path}")
	public void setHost(String port) {
		REQUEST_PATH = port;
	}

	/**
	 * 对比后缀
	 */
	public static String IMGSUF = "BMP,JPG,JPEG,PNG,GIF";

	/**
	 * 文件后缀
	 */
	public static String FILESUF = "DOCX,DOC,PDF";

	/**
	 * 压缩包后缀
	 */
	public static String PACKSUF = "ZIP,RAR";

	/**
	 * 登录用户类型-学生端
	 */
	public static String STU = "stu";

	/**
	 * 登录用户类型-综评端
	 */
	public static String REV = "rev";

	/**
	 * 单学校
	 */
	public static String SINGLE_SCHOOL = "单学校";

	/**
	 * 常量0
	 */
	public static String ZERO = "0";

	/**
	 * 常量5
	 */
	public static int FIVE = 5;

	/**
	 * 学生表前缀
	 */
	public static String TABLEPREFIX = "stu_information_";

	/**
	 * 日志标识
	 */
	public static final String REV_PHYSICAL = "学生体能指标";
	public static final String REV_ACADEMIC = "学生学业指标";
	public static final String REV_LOG = "操作日志";
	public static final String REV_LOGIN = "-";
	public static final String REV_OVERVIEW = "综合评价指标";
	public static final String REV_GRADE = "年级";
	public static final String REV_CLASS = "班级";
	public static final String REV_EVALUATION_PLAN = "评价方案";
	public static final String REV_SCHOOL = "学校管理";
	public static final String STU_INFO = "学生管理";
	public static final String SEMESTER = "学期管理";
	public static final String REV_PLAN = "综评计划管理";
	public static final String STU_CASE = "学生事例信息表";
	public static final String STU_ARCHIVES = "学生综评档案";
	public static final String REV_USER = "用户管理";
	public static final String REV_ROLE = "角色管理";
	public static final String REV_EVALUATION = "学生互评查看";
	public static final String OVERALL_EVAL= "综评档案";
	public static final String STU_USER = "学生信息登录表";
	public static final String TEACHER_EVALUATION = "教师评价学生";
	public static final String ACADEMIC_SCORE = "学生学业成绩";
	public static final String PHYSICAL_SCORE = "学生体能成绩";


	public static final String LOG_INSERT = "新增";
	public static final String LOG_EDIT = "修改";
	public static final String LOG_DELETE = "删除";
	public static final String LOG_CHECK = "查看";
	public static final String LOG_LOGIN = "登录";
	public static final String LOG_LOGIN_OUT = "登出";
	public static final String LOG_DOWNLOAD = "下载";
	public static final String LOG_IMPORT = "导入";
	public static final String LOG_EDIT_PASSWORD = "修改密码";
	public static final String LOG_RESET_PASSWORD = "重置密码";
	public static final String LOG_EVALUATION = "评价";
	public static final String LOG_DOWNLOAD_TEMPLATE = "下载模板";
	public static final String LOG_DOWNLOAD_ERROR = "下载错误信息";
}
